import React, { useState } from 'react'
import { Radio, Space } from 'antd'
const MyRadio = () => {
  const [value1, setValue1] = useState(1)
  const [value2, setValue2] = useState(1)
  const onChange1 = e => {
    setValue1(e.target.value)
  }
  const onChange2 = e => {
    setValue2(e.target.value)
  }
  const options1 = [
    {
      label: 'A',
      value: 1
    },
    {
      label: 'B',
      value: 2
    }
  ]
  return (
    <>
      <div className="box">
        <div className="box-header">base</div>
        <div className="box-body">
          <div className="box-content">
            <Space direction="vertical">
              <Radio.Group value={value1} onChange={onChange1}>
                <Radio value={1}>A</Radio>
                <Radio value={2}>B</Radio>
                <Radio value={3}>C</Radio>
              </Radio.Group>
              <Radio.Group buttonStyle="solid" optionType="button" options={options1} value={value2} onChange={onChange2}></Radio.Group>
            </Space>
          </div>
        </div>
      </div>
    </>
  )
}
export default MyRadio